package tx.common;

import cn.stimd.spring.beans.factory.annotation.Autowired;
import cn.stimd.spring.context.stereotype.Repository;
import cn.stimd.spring.jdbc.core.JdbcTemplate;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
@Repository
public class AccountDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void save(String phone){
        String sql = "INSERT INTO t_account (phone, balance) VALUES (?, ?)";
        jdbcTemplate.update(sql, phone, 0);
    }
}
